package com.lywz.biz.common.entity.scenic;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import com.lywz.core.entity.AbstractEntity;

/**
 * 景点实体类
 * 
 * @author Huadi Luojun
 * @date 2010-4-30
 */

@Entity
@Table(name = "t_scenic_attraction")
@NamedQueries({@NamedQuery(name="scenic.getAttractionList",query="from Attraction where scenicBelongsTo = :scenicId")})
public class Attraction extends AbstractEntity {

    private static final long serialVersionUID = 3495408449254165182L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    
    private String name; // 景点名称

    private String introduction; // 简介

    private String imageUrl; // 图片路径

    private Integer scenicBelongsTo; // 所属景区

    //////////Setters, Getters and Constructors//////////
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Integer getScenicBelongsTo() {
        return scenicBelongsTo;
    }

    public void setScenicBelongsTo(Integer scenicBelongsTo) {
        this.scenicBelongsTo = scenicBelongsTo;
    }

    /** NULL Constructor */
    public Attraction() {
    }

    /** Full Constructor */
    public Attraction(Integer id, String name, String introduction, String imageUrl,
            Integer scenicBelongsTo) {
        super();
        this.id = id;
        this.name = name;
        this.introduction = introduction;
        this.imageUrl = imageUrl;
        this.scenicBelongsTo = scenicBelongsTo;
    }
}
